home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-serious-
/
programming
/
e
/
lsestuff
/
old
/
d1da.e
next >
Wrap
Text File
|
1999-11-29
|
767b
|
50 lines
OPT MODULE
MODULE 'myoo/xl'
OBJECT point OF xni
value
ENDOBJECT
EXPORT OBJECT d1da OF xli
PRIVATE
unsetvalue
ENDOBJECT
PROC d1da() OF d1da IS EMPTY
PROC end() OF d1da
self.fastdisposeall(SIZEOF point)
ENDPROC
PROC set(x, value) OF d1da
DEF point:PTR TO point
point:=self.find(x)
IF point = NIL
point:=FastNew(SIZEOF point)
self.addtail(point)
point.id:=x
ENDIF
point.value:=value
ENDPROC
PROC get(x) OF d1da
DEF point:PTR TO point
point:=self.find(x)
ENDPROC point.value
PROC unset(x) OF d1da
DEF point:PTR TO point
point:=self.find(x)
IF point = NIL THEN RETURN NIL
self.remove(point)
FastDispose(point, SIZEOF point)
ENDPROC
PROC unsetvalue(val) OF d1da
self.unsetvalue:=val
ENDPROC